<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>


<h2 align="center">Logowanie</h2>
<c:if test="${not empty param.login_error}">
  <center><font color="red">
    Niepoprawne dane, spróbuj ponownie.<br/><br/>
    Przyczyna: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.
  </font></center>
</c:if>
<form name="f" action="<c:url value='j_spring_security_check'/>" method="POST">
  <table align="center">
    <tr><td>Login: </td><td><input type='text' name='j_username' value='<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>'/></td></tr>
    <tr><td>Hasło:</td><td><input type='password' name='j_password'></td></tr>
       
    <tr align="center"><td colspan='2'><input name="submit" type="submit"  value="Zaloguj"></td></tr>
  </table>
</form>
